﻿<%@ Page Language="C#" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <script runat="server">
        protected void OnDatePickerFormatChanged(object sender, EventArgs e)
        {
            SampleDatePicker.DateFormatString = formatDropDown.SelectedValue;
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="scriptMag" runat="server" EnablePartialRendering="true">
    </asp:ScriptManager>
    <DotNetAge:DatePicker ID="SampleDatePicker" runat="server" DisplayMode="Picker" ShowButtonImageOnly="True"
        ShowDefaultButtonImage="True" ShowIconMode="Both" AnimationOnShow="slideDown"
        ButtonText="..." Width="200px">
    </DotNetAge:DatePicker>
    <br />
    Select the date format below<br />
    <asp:DropDownList ID="formatDropDown" runat="server" Width="200" OnSelectedIndexChanged="OnDatePickerFormatChanged"
        AutoPostBack="true">
        <asp:ListItem Value="MM/dd/yyyy" Text="Default - MM/dd/yyyy" Selected="True"></asp:ListItem>
        <asp:ListItem Value="yyyy-MM-dd" Text="ISO 8601 - yyyy-MM-dd"></asp:ListItem>
        <asp:ListItem Value="d MMM, yyyy" Text="Short Date String Format- d MMM, yyyy"></asp:ListItem>
        <asp:ListItem Value="d MMMM, yyyy" Text="Medium - d MMMM, yyyy"></asp:ListItem>
        <asp:ListItem Value="dddd, d MMMM, yyyy" Text="LongDateString Format - dddd, d MMMM, yyyy"></asp:ListItem>
    </asp:DropDownList>
    </form>
</body>
</html>
